<html>
<head><meta charset="utf-8"><title>prelude crates · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html">prelude crates</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="134763622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134763622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134763622">(Sep 27 2018 at 18:12)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> is there an easy way to get a list of "prelude crates" which can be referenced without need of an <code>extern crate</code>?</p>



<a name="134763652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134763652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134763652">(Sep 27 2018 at 18:12)</a>:</h4>
<p>it's trivially computed in the resolve code. you might want to put it in the <code>Session</code></p>



<a name="134763660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134763660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134763660">(Sep 27 2018 at 18:12)</a>:</h4>
<p>it's <code>core</code>, <code>std</code>, <code>meta</code>, plus all the names in <code>--extern</code></p>



<a name="134763695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134763695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134763695">(Sep 27 2018 at 18:13)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/c9865b1c37f8cb8a257591e6ea0b32a5df1f3d41/src/librustc_resolve/lib.rs#L1666-L1675" target="_blank" title="https://github.com/rust-lang/rust/blob/c9865b1c37f8cb8a257591e6ea0b32a5df1f3d41/src/librustc_resolve/lib.rs#L1666-L1675">https://github.com/rust-lang/rust/blob/c9865b1c37f8cb8a257591e6ea0b32a5df1f3d41/src/librustc_resolve/lib.rs#L1666-L1675</a></p>



<a name="134763818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134763818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134763818">(Sep 27 2018 at 18:15)</a>:</h4>
<p>OK, I'm asking because of <span class="user-mention" data-user-id="116107">@davidtwco</span>'s PR, which is <a href="https://github.com/rust-lang/rust/pull/54603#discussion_r221025204" target="_blank" title="https://github.com/rust-lang/rust/pull/54603#discussion_r221025204">special casing the std name</a> — I think because of the <code>exern crate std</code> that we insert in the prelude.</p>



<a name="134763825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134763825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134763825">(Sep 27 2018 at 18:15)</a>:</h4>
<p>It seems like the "general" form of this check is to look for those crates that are in the prelude</p>



<a name="134763970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134763970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134763970">(Sep 27 2018 at 18:17)</a>:</h4>
<p>I looked for a while to see if I could find anything that did that and couldn't find anything.</p>



<a name="134764020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764020">(Sep 27 2018 at 18:18)</a>:</h4>
<p><code>rustc_resolve</code> is the only place that needs it to do its job, heh</p>



<a name="134764048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764048">(Sep 27 2018 at 18:18)</a>:</h4>
<p>(as in, I looked for some function or property somewhere that I could call to check if a <code>CrateNum</code> was from the prelude)</p>



<a name="134764081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764081">(Sep 27 2018 at 18:19)</a>:</h4>
<p>aaah</p>



<a name="134764107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764107">(Sep 27 2018 at 18:19)</a>:</h4>
<p>you can check if you can access a name directly, but not that a <code>CrateNum</code> relates to that</p>



<a name="134764108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764108">(Sep 27 2018 at 18:19)</a>:</h4>
<p>it's kind of a tricky thing overall</p>



<a name="134764112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764112">(Sep 27 2018 at 18:19)</a>:</h4>
<p>depends how accurate you want to get</p>



<a name="134764191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764191">(Sep 27 2018 at 18:20)</a>:</h4>
<p>also <span class="user-mention" data-user-id="119009">@eddyb</span> I just filed <a href="https://github.com/rust-lang/rust/issues/54618" target="_blank" title="https://github.com/rust-lang/rust/issues/54618">#54618</a> — namely that we ought to search prelude crates for traits that offer the methods the user was trying to call</p>



<a name="134764196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764196">(Sep 27 2018 at 18:20)</a>:</h4>
<p>no idea how hard that's going to be though</p>



<a name="134764217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764217">(Sep 27 2018 at 18:20)</a>:</h4>
<p>okay, so, <code>rustc_resolve</code> already has code for that too</p>



<a name="134764231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764231">(Sep 27 2018 at 18:21)</a>:</h4>
<p>maybe we should speculatively load all of them and record the <code>CrateNum</code>s</p>



<a name="134764267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764267">(Sep 27 2018 at 18:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://github.com/rust-lang/rust/blob/c9865b1c37f8cb8a257591e6ea0b32a5df1f3d41/src/librustc_resolve/lib.rs#L4404-L4408" target="_blank" title="https://github.com/rust-lang/rust/blob/c9865b1c37f8cb8a257591e6ea0b32a5df1f3d41/src/librustc_resolve/lib.rs#L4404-L4408">https://github.com/rust-lang/rust/blob/c9865b1c37f8cb8a257591e6ea0b32a5df1f3d41/src/librustc_resolve/lib.rs#L4404-L4408</a></p>



<a name="134764325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764325">(Sep 27 2018 at 18:22)</a>:</h4>
<p>note the <code>maybe_</code> in the name - that won't produce an user error if the crate can't be loaded</p>



<a name="134764331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764331">(Sep 27 2018 at 18:22)</a>:</h4>
<p>I remembered the code for this from my last PR that was predominantly in <code>rustc_resolve</code>, but couldn't see a way to access that stuff from where ever this change took place.</p>



<a name="134764340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764340">(Sep 27 2018 at 18:22)</a>:</h4>
<blockquote>
<p>maybe we should speculatively load all of them and record the <code>CrateNum</code>s</p>
</blockquote>
<p>well, I <em>think</em> we only want to do that in the case of a compilation error?</p>



<a name="134764346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764346">(Sep 27 2018 at 18:22)</a>:</h4>
<p>I just remember people were concerned about side effects</p>



<a name="134764353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764353">(Sep 27 2018 at 18:22)</a>:</h4>
<p>I think due to linking or something though</p>



<a name="134764354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764354">(Sep 27 2018 at 18:22)</a>:</h4>
<p>so I guess cache it in <code>Session</code>?</p>



<a name="134764363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764363">(Sep 27 2018 at 18:23)</a>:</h4>
<p>(and compute it on-demand)</p>



<a name="134764392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764392">(Sep 27 2018 at 18:23)</a>:</h4>
<p>actually, it should be cheap to get the crates if they were loaded already, so, nvm, you can just do this on every error and be fine</p>



<a name="134764397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764397">(Sep 27 2018 at 18:23)</a>:</h4>
<p>man I wish the query system went back that far</p>



<a name="134764402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764402">(Sep 27 2018 at 18:23)</a>:</h4>
<p>just put it somewhere central for convenience</p>



<a name="134764408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764408">(Sep 27 2018 at 18:23)</a>:</h4>
<p>"feels like a query"</p>



<a name="134764416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764416">(Sep 27 2018 at 18:23)</a>:</h4>
<p>I wish I had nothing else to work on than pushing back the query system to parsing :P</p>



<a name="134764465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764465">(Sep 27 2018 at 18:24)</a>:</h4>
<p>I have most of it planned out, I just... need to go do it</p>



<a name="134764744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134764744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134764744">(Sep 27 2018 at 18:28)</a>:</h4>
<p>I'm not sure I follow completely. If I've got a <code>CrateNum</code>, and I want to call some function to check whether it is from the prelude crates - I'm not quite understanding what change I'd need to make in order to do that lookup.</p>



<a name="134765374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765374">(Sep 27 2018 at 18:38)</a>:</h4>
<blockquote>
<p>I wish I had nothing else to work on than pushing back the query system to parsing :P</p>
</blockquote>
<p>me too :)</p>



<a name="134765424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765424">(Sep 27 2018 at 18:38)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> hmm, I think that the code <span class="user-mention" data-user-id="119009">@eddyb</span> pointed out would wind up giving a set of crate <strong>names</strong></p>



<a name="134765430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765430">(Sep 27 2018 at 18:38)</a>:</h4>
<p>so I guess you'd have to check if the name of the crate with that crate num is in that set</p>



<a name="134765436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765436">(Sep 27 2018 at 18:38)</a>:</h4>
<p>well, initially it's a set of names</p>



<a name="134765447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765447">(Sep 27 2018 at 18:38)</a>:</h4>
<p>but if you use the last code I linked, you actually get a set of <code>CrateNum</code>s</p>



<a name="134765451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765451">(Sep 27 2018 at 18:39)</a>:</h4>
<p>which is better, I think?</p>



<a name="134765550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765550">(Sep 27 2018 at 18:40)</a>:</h4>
<p>seems better, yeah</p>



<a name="134765694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765694">(Sep 27 2018 at 18:42)</a>:</h4>
<p>because it might matter <em>which</em> of several crates with the same name can <em>actually</em> be referred to in the current crate (i.e. what <code>--extern foo=...</code> makes it load, vs what's a dependency of other dependencies)</p>



<a name="134765743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765743">(Sep 27 2018 at 18:43)</a>:</h4>
<p>So, the intention is to just save those from that point into something in <code>Session</code>?</p>



<a name="134765756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765756">(Sep 27 2018 at 18:43)</a>:</h4>
<p>not "from that point"</p>



<a name="134765765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765765">(Sep 27 2018 at 18:43)</a>:</h4>
<p>you don't want <code>rustc_resolve</code> to have <em>any</em> side-effects like that</p>



<a name="134765820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765820">(Sep 27 2018 at 18:44)</a>:</h4>
<p>instead, you want to move that code in a method on the <code>Session</code>, so it can be called from multiple places</p>



<a name="134765868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134765868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134765868">(Sep 27 2018 at 18:45)</a>:</h4>
<p>Ah, I see, sounds good. Thanks.</p>



<a name="134769033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134769033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134769033">(Sep 27 2018 at 19:40)</a>:</h4>
<p>I've changed this with the most recent commit.</p>



<a name="134772196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134772196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134772196">(Sep 27 2018 at 20:37)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> does <a href="https://github.com/rust-lang/rust/pull/54603#issuecomment-425225158" target="_blank" title="https://github.com/rust-lang/rust/pull/54603#issuecomment-425225158">this failure</a> look spurious to you? - not sure what the most recent commit could have done to really break that. It passed tests locally.</p>



<a name="134772681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134772681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134772681">(Sep 27 2018 at 20:45)</a>:</h4>
<p>sure does</p>



<a name="134772737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134772737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134772737">(Sep 27 2018 at 20:46)</a>:</h4>
<p>Cool, restarted that Travis job.</p>



<a name="134774102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774102">(Sep 27 2018 at 21:12)</a>:</h4>
<p>Huh, it happened again.</p>



<a name="134774119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774119">(Sep 27 2018 at 21:13)</a>:</h4>
<p>It doesn't seem to be happening locally.</p>



<a name="134774388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774388">(Sep 27 2018 at 21:18)</a>:</h4>
<p>well</p>



<a name="134774389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774389">(Sep 27 2018 at 21:18)</a>:</h4>
<p><em>actually</em></p>



<a name="134774391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774391">(Sep 27 2018 at 21:18)</a>:</h4>
<p>that same code <em>is</em> used in symbol name generation</p>



<a name="134774393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774393">(Sep 27 2018 at 21:18)</a>:</h4>
<p>which..is one of the things I now hate about it</p>



<a name="134774399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774399">(Sep 27 2018 at 21:18)</a>:</h4>
<p>also one of the things that is totally my fault</p>



<a name="134774402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774402">(Sep 27 2018 at 21:18)</a>:</h4>
<p>but never mind</p>



<a name="134774409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774409">(Sep 27 2018 at 21:19)</a>:</h4>
<p>so it is plausible that we have caused these errors</p>



<a name="134774415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774415">(Sep 27 2018 at 21:19)</a>:</h4>
<p>why it doesn't occur locally idk, are you building to stage2?</p>



<a name="134774418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774418">(Sep 27 2018 at 21:19)</a>:</h4>
<p>perhaps that is it?</p>



<a name="134774428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774428">(Sep 27 2018 at 21:19)</a>:</h4>
<p>I've started a full build locally when the first failure happened.</p>



<a name="134774434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774434">(Sep 27 2018 at 21:19)</a>:</h4>
<p>It has gotten past where it would normally fail on Travis.</p>



<a name="134774509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774509">(Sep 27 2018 at 21:20)</a>:</h4>
<p>It surprises me because the commit just moves where something is instantiated, there's no real functional difference (except the comparison for the item path changing).</p>



<a name="134774926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774926">(Sep 27 2018 at 21:28)</a>:</h4>
<p>Huh, hit the error locally at the very end of the compiler artifacts for stage1.</p>



<a name="134774955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134774955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134774955">(Sep 27 2018 at 21:30)</a>:</h4>
<p>I'm really not sure what it is about the commit that would cause that.</p>



<a name="134775276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775276">(Sep 27 2018 at 21:37)</a>:</h4>
<p>Any ideas <span class="user-mention" data-user-id="116009">@nikomatsakis</span>?</p>



<a name="134775461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775461">(Sep 27 2018 at 21:41)</a>:</h4>
<p>Since Travis seems to have messed up the log for the most recent retry, this is a gist of the error I see locally: <a href="https://gist.github.com/davidtwco/36b469179c0bd3851b0de4c426abc0fa" target="_blank" title="https://gist.github.com/davidtwco/36b469179c0bd3851b0de4c426abc0fa">https://gist.github.com/davidtwco/36b469179c0bd3851b0de4c426abc0fa</a></p>



<a name="134775798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775798">(Sep 27 2018 at 21:48)</a>:</h4>
<blockquote>
<p>I'm really not sure what it is about the commit that would cause that.</p>
</blockquote>
<p>ugh. I'm not really sure, but I can sort of imagine...</p>



<a name="134775802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775802">(Sep 27 2018 at 21:49)</a>:</h4>
<p>hmm</p>



<a name="134775816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775816">(Sep 27 2018 at 21:49)</a>:</h4>
<p>I feel like it's weird that we generate a symbol that takes into account where the <code>extern crate</code> appears in the source tree anyway</p>



<a name="134775821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775821">(Sep 27 2018 at 21:49)</a>:</h4>
<p>but I imagine that if we are altering things based on edition</p>



<a name="134775829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775829">(Sep 27 2018 at 21:49)</a>:</h4>
<p>maybe we are linking together crates that wind up with a different .. view? not sure</p>



<a name="134775864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775864">(Sep 27 2018 at 21:50)</a>:</h4>
<p>I have to run but let me give you a 'tip'</p>



<a name="134775891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775891">(Sep 27 2018 at 21:50)</a>:</h4>
<p>All this new commit does for the <code>rustc_resolve</code> module is change where we get the prelude crate names from. Other than that, it's just the trait suggestion logic that changed again in this commit.</p>



<a name="134775929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775929">(Sep 27 2018 at 21:51)</a>:</h4>
<p>I think the code is in <code>librustc_codegen_utils/symbol_names.rs</code></p>



<a name="134775992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775992">(Sep 27 2018 at 21:52)</a>:</h4>
<p>The previous commit (which didn't seem to have that issue) did change that file, but only to add a <code>#[derive(Debug)]</code> to a struct.</p>



<a name="134775994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775994">(Sep 27 2018 at 21:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> in particular</p>
<div class="codehilite"><pre><span></span>fn def_symbol_name&lt;&#39;a, &#39;tcx&gt;(tcx: TyCtxt&lt;&#39;a, &#39;tcx, &#39;tcx&gt;, def_id: DefId) -&gt; ty::SymbolName {
    let mut buffer = SymbolPathBuffer::new();
    item_path::with_forced_absolute_paths(|| {
        tcx.push_item_path(&amp;mut buffer, def_id);
    });
    buffer.into_interned()
}
</pre></div>



<a name="134775998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134775998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134775998">(Sep 27 2018 at 21:52)</a>:</h4>
<p>I bet it's some kind of interaction with that flag</p>



<a name="134776009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134776009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134776009">(Sep 27 2018 at 21:53)</a>:</h4>
<p>Perhaps.. but I didn't really change that flag at all, I added a new one, that only changes things when that flag isn't set.</p>



<a name="134776023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134776023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134776023">(Sep 27 2018 at 21:53)</a>:</h4>
<p>well, maybe you're wrong about that? :)</p>



<a name="134776026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134776026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134776026">(Sep 27 2018 at 21:53)</a>:</h4>
<p>I might be.</p>



<a name="134776031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134776031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134776031">(Sep 27 2018 at 21:53)</a>:</h4>
<p>I guess I did.</p>



<a name="134776035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134776035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134776035">(Sep 27 2018 at 21:53)</a>:</h4>
<p>alternatively</p>



<a name="134776040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134776040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134776040">(Sep 27 2018 at 21:53)</a>:</h4>
<p>sometimes we fail to set the flag in some path</p>



<a name="134776050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134776050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134776050">(Sep 27 2018 at 21:54)</a>:</h4>
<p>though I'd be surprsied to see such a bug crop up now</p>



<a name="134776089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134776089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134776089">(Sep 27 2018 at 21:54)</a>:</h4>
<p>No, I think you're right. When I stopped it from recursing to the crate root when making the item path that could be it.</p>



<a name="134776118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134776118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134776118">(Sep 27 2018 at 21:54)</a>:</h4>
<p>fwiw I think <span class="user-mention" data-user-id="124287">@mw</span> is overhauling the symbol name generation code... not sure what exactly they have in mind though</p>



<a name="134776119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134776119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134776119">(Sep 27 2018 at 21:54)</a>:</h4>
<p>Must have been lucky with the previous commit to not have failed I guess.</p>



<a name="134779391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134779391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134779391">(Sep 27 2018 at 23:01)</a>:</h4>
<p>Alright, I've got a fresh build and tests passing locally, it takes a slightly different approach. Pushed that, so here's hoping.</p>



<a name="134838447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134838447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134838447">(Sep 28 2018 at 17:14)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> nice!</p>



<a name="134846381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134846381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134846381">(Sep 28 2018 at 19:32)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> around?</p>



<a name="134846406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134846406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134846406">(Sep 28 2018 at 19:33)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/54603#pullrequestreview-159995818" target="_blank" title="https://github.com/rust-lang/rust/pull/54603#pullrequestreview-159995818">left a review</a></p>



<a name="134846530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/prelude%20crates/near/134846530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/prelude.20crates.html#134846530">(Sep 28 2018 at 19:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ping</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>